public class TestDemo {
    public static void main(String[] args) {
        int n = 0;
        int sum =0;
        for (n = 1; n <= 100 ; n++) {
            if(n % 10 == 9 ) {
                sum++;
            }
            if(n / 10 == 9){
                sum++;
            }
        }
        System.out.println(sum);

    }

}

